﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using ParkingService_REST_JSON_WCF;

namespace ClienApp
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {

            WebClient client = new WebClient();
            byte[] result;
            try
            {
                //StringBuilder sb = new StringBuilder(result);
                //string newResponse = sb.ToString().Replace(@"\", "");
                //newResponse = "\"data\" : " + newResponse;
                result = new WebClient().UploadData("http://localhost:53499/ParkingService.svc/GetJSON/" + textBox1.Text,
                                               new byte[1]);

            }
            catch (WebException wex)
            {
                //result = wex.Message;
            }
            MessageBox.Show("Something happened");

        }

    }
}